package com.ruikc.study.demo.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;

import java.io.Serial;


/**
 * 发票详情表，记录发票的详细商品信息 实体类。
 *
 * @author zhiyuan
 * @since 2025-02-22
 */
@Table("invoice_details")
public class InvoiceDetails implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 发票详情的唯一标识符，自增主键
     */
    @Id(keyType = KeyType.Auto)
    private Integer detailId;

    /**
     * 关联的发票 ID，外键关联 invoices 表的 invoice_id
     */
    private Integer invoiceId;

    /**
     * 商品 ID，外键关联 product 表的 product_id
     */
    private Integer productId;

    /**
     * 商品名称
     */
    private String productTitle;

    /**
     * 商品规格 ID
     */
    private Integer productSpecId;

    /**
     * 商品规格名称
     */
    private String productSpecTitle;

    /**
     * 商品数量
     */
    private Integer quantity;

    /**
     * 商品单价
     */
    private BigDecimal unitPrice;

    /**
     * 商品金额
     */
    private BigDecimal amount;

    /**
     * 税率（以 100% 为基数）
     */
    private Integer taxPercent;

    /**
     * 商品税额
     */
    private BigDecimal taxAmount;

    /**
     * 商品价税合计
     */
    private BigDecimal totalWithTax;

    /**
     * 发票详情状态，10 - 正常等
     */
    private Integer status;

    /**
     * 发票详情记录的创建时间
     */
    private String createdAt;

    /**
     * 发票详情记录的更新时间
     */
    private String updatedAt;

    /**
     * 发票详情记录的删除时间，若未删除则为空
     */
    private String deletedAt;

    public Integer getDetailId() {
        return detailId;
    }

    public void setDetailId(Integer detailId) {
        this.detailId = detailId;
    }

    public Integer getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(Integer invoiceId) {
        this.invoiceId = invoiceId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductTitle() {
        return productTitle;
    }

    public void setProductTitle(String productTitle) {
        this.productTitle = productTitle;
    }

    public Integer getProductSpecId() {
        return productSpecId;
    }

    public void setProductSpecId(Integer productSpecId) {
        this.productSpecId = productSpecId;
    }

    public String getProductSpecTitle() {
        return productSpecTitle;
    }

    public void setProductSpecTitle(String productSpecTitle) {
        this.productSpecTitle = productSpecTitle;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getTaxPercent() {
        return taxPercent;
    }

    public void setTaxPercent(Integer taxPercent) {
        this.taxPercent = taxPercent;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public BigDecimal getTotalWithTax() {
        return totalWithTax;
    }

    public void setTotalWithTax(BigDecimal totalWithTax) {
        this.totalWithTax = totalWithTax;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(String updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(String deletedAt) {
        this.deletedAt = deletedAt;
    }

}
